Skip to content

Merge the nine audit fix branches - #10

Open
KARLalpha4768 wants to merge 18 commits into
mainfrom
fix/audit-remediation
Open

KARLalpha4768 wants to merge 18 commits into
mainfrom
fix/audit-remediation

Conversation

@KARLalpha4768

@KARLalpha4768 KARLalpha4768 commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

What this is

One branch that merges the nine fix branches behind PRs #1 to #9 (open since Oct 25), so they can be reviewed and merged together instead of one at a time. No file is touched by more than one of them, and all nine merged without conflicts. Nothing here is new work: each merge commit brings in one existing branch unchanged.

Branch What it changes
fix/secrets-env Cesium token, API key and database DSN read from environment variables; new /api/config function
fix/api-nlp-lockdown /api/nlp requires an API key, limits origins, rate-limits and validates input
fix/docker-build Digital-twin container start command, C++ sources, no Docker socket mount
fix/infra-hardening Kubernetes secrets and Terraform networking
fix/correctness-high CORR-01 to CORR-05 in the conjunction screener, ASCOM HAL and science modules
fix/orbit-propagator RA wrap, cos(dec) in angular rate, Kepler solver (CORR-07, CORR-08)
fix/twin-ws One shared broadcaster task; ECI to Earth-fixed longitude (PERF-01, CORR-06)
fix/db Commit, rollback and close handling; parameterized updates (CORR-10)
chore/build-test-hygiene .dockerignore, pytest in CI, deduplicated photometry source

How the combined branch was checked

Run locally on Python 3.13 with the CI install step (pip install -r requirements.txt):

  • ruff check . --select=E9,F63,F7,F82: passes, also with ascom_hal.py included.
  • pytest -q: 36 passed.
  • python end_to_end_test.py: 6 of 6.
  • The six science module self-tests and python main.py: all exit 0.
  • api/nlp.js and api/config.js called through a local harness: 503 when NLP_API_KEY is unset, 401 without or with a wrong key, 403 from another origin, 429 after 20 requests a minute, and /api/config returns the token from the environment.
  • The digital-twin start command from the Dockerfile loads the app and serves /docs; the command on main fails with ModuleNotFoundError: No module named 'src'. The image itself was not built.
  • No Cesium token, demo API key or other credential pattern remains in the tree.

Before merging: this changes the live demo

  1. Set CESIUM_ION_TOKEN in Vercel first. The globe now gets its token from /api/config. Without the variable it receives an empty token.
  2. The terminal's Gemini fallback will stop answering for visitors. /api/nlp now requires an X-API-Key header, and frontend/sentinel_terminal.js (unchanged by any branch) does not send one. Free-text input that the built-in parser does not recognise will show "I didn't understand that" instead of a Gemini reply. Built-in commands are unaffected. If the public demo should keep the fallback, that needs a decision before merge, since a static page cannot hold a secret key.
  3. Set NLP_API_KEY and, if the site is served from another domain, ALLOWED_ORIGINS. Both functions default to allowing only https://sentinelforge.vercel.app.
  4. Rotate the Cesium token. It is removed from the files but remains in git history.

Not covered

  • .vercel/project.json is still tracked.
  • CI excludes ascom_hal.py from the lint step; with fix/correctness-high merged that exclusion is no longer needed.

Merging this PR lands the same commits as #1 to #9, so GitHub will mark those nine as merged and their branches can be deleted.

https://claude.ai/code/session_01GQ1LmN35bvwVLnZ9PiewFe


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants